import { createApp } from "vue";
import App from "./App.vue";
//使用路由
import router from "@/router";
// 引入pinia
import { setupStore } from "@/store";

//引入element-plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css"; //导入css变量
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 本地SVG图标
import "virtual:svg-icons-register";
// 国际化
import i18n from "@/lang/index";

const app = createApp(App);

setupStore(app); //创建pinia
//注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(ElementPlus); //导入element-plus
app.use(i18n);
app.use(router).mount("#app");
